import request from "@/utils/request";

// 查询商城轮播图列表
export function listConfig(query) {
  return request({
    url: "/system/config/list",
    method: "get",
    params: query,
  });
}

// 查询商城轮播图详细
export function getConfig(mallId) {
  return request({
    url: "/system/config/" + mallId,
    method: "get",
  });
}
// 上传轮播图
export function uploadimage(data) {
  return request({
    url: "/file/upload",
    method: "post",
    data,
  });
}
// 新增商城轮播图
export function addConfig(data) {
  return request({
    url: "/system/config",
    method: "post",
    data: data,
  });
}

// 修改商城轮播图
export function updateConfig(data) {
  return request({
    url: "/system/config",
    method: "put",
    data: data,
  });
}

// 删除商城轮播图
export function delConfig(mallId) {
  return request({
    url: "/system/config/" + mallId,
    method: "delete",
  });
}
